package drds.binlog.parse.driver.packets;

import com.google.common.base.Preconditions;

public abstract class PacketWithHeaderPacket implements Packet
{

    protected HeaderPacket headerPacket;

    protected PacketWithHeaderPacket()
    {
    }

    protected PacketWithHeaderPacket(HeaderPacket headerPacket)
    {
        setHeaderPacket(headerPacket);
    }

    public HeaderPacket getHeaderPacket()
    {
        return headerPacket;
    }

    public void setHeaderPacket(HeaderPacket headerPacket)
    {
        Preconditions.checkNotNull(headerPacket);
        this.headerPacket = headerPacket;
    }


}
